<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

	<head>
	    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
		<title>再生网首页</title>
		<jsp:include page="lbi/css.jsp"></jsp:include>
		<link rel="stylesheet" href="<c:url value="/static/css/common/swiper.min.css"/>" /> 
		<link rel="stylesheet" href="<c:url value="/static/css/index.css"/>"/>
	</head>

	<body>
		<div class="wrap index">
			<!-- 头部开始-->
			<jsp:include page="lbi/head.jsp"></jsp:include>
			<!-- 头部结束-->

			<!-- banner开始-->
			<div class="common">
				<div class="banner-left">
					<div class="banner-left-sectionList">
						<div class="s_catagory">
							<h2>全部品类</h2>
						</div>
						
                        <c:forEach items="${list }" var="list">
							<div class="banner-left-section">
								<div class="title">
									<i class="icon icon-b01"></i>
									<a href="javascript:;">${list.name }</a>
									<input type="hidden" value="0">
									<!-- <i class="icon icon-circel-link"></i> -->
								</div>
								<input type="hidden" value="${list.categoryId }" />
								<ul>
									<c:forEach items="${list.listCategory }" var="listCategory">
										<li>
											<a ptype="productName" href="javascript:;">${listCategory.name }</a>
										</li>
									</c:forEach>
								</ul>
							</div>
						</c:forEach>
                    </div>
				</div>
				
				<div class="banner-middle">
					<div class="banner-slide">
						<!-- Swiper -->
						<div class="swiper-container">
							<div class="swiper-wrapper">
								<c:forEach items="${broadcastVo }" var="broadcastVo">
									<div class="swiper-slide"><img src="http://qiniudns.zaishengwang.com/${broadcastVo.img }"></div>
								</c:forEach>
							</div>
							<!-- Add Pagination -->
							<div class="swiper-pagination">
							</div>
							<!-- Add Arrows -->
							<div class="swiper-button-next"></div>
							<div class="swiper-button-prev"></div>
						</div>
					</div>
				</div>

				<div class="banner-right">
					<div class="login-action">
						<div class="head-wrap">
							<div class="head">
								<img src="static/img/head.jpg">
							</div>
							<div class="welcome">
								Hi，欢迎来到再生网！
							</div>
							<div class="login-action-button">
								<button type="button" class="bt-login">登录</button>
								<button type="button" class="bt-register">注册</button>
							</div>
						</div>
					</div>
                    <div class="login-serve">
                    	<div class="tab">
							<span><a href="" target="_blank">再生服务</a></span>
						</div>
						<div class="serve-content">
      					<ul>
	      				<li class="serve-c1"><i class="icon"></i><a href="javascript:void(0);" id="opener1">会员认证</a></li>
	      				<li class="serve-c2"><i class="icon"></i><a href="javascript:void(0);" id="opener2">发票供需</a></li>
	      				<li class="serve-c3"><i class="icon"></i><a href="javascript:void(0);" id="opener3">现货供应</a></li>
	      				<li class="serve-c4"><i class="icon"></i><a href="javascript:void(0);" id="opener4">现货求购</a></li>
	      				<li class="serve-c5"><i class="icon"></i><a href="javascript:void(0);" id="opener5">委托采购</a></li>
	      				<li class="serve-c6"><i class="icon"></i><a href="javascript:void(0);" id="opener6">平台代卖</a></li>
      					</ul>
      				</div>
                    </div>
					<div class="login-slide">
						<div class="tab">
							<span><a href="" target="_blank">公告</a></span>
						</div>
						<div class="login-marquee" id="notice-marquee">
							<ul>
								<li>
									<a href="/help/newsInfo?id=588" target="_blank">【再生网早报】-20180613</a>
								</li>
								<li>
									<a href="/help/newsInfo?id=587" target="_blank">【再生网早报】-20180612</a>
								</li>
								<li>
									<a href="/help/newsInfo?id=586" target="_blank">【再生网早报】-20180611</a>
								</li>
								<li>
									<a href="/help/newsInfo?id=585" target="_blank">人民日报关注独角兽快速成长 | 再生网王东：独角兽的中国故事或刚开始</a>
								</li>
							</ul>
						</div>
					</div>
				</div>
			</div>
			<!-- banner结束-->
			<!--行形走势开始-->
			<div class="content content-hqzs common clearfix">
                <div class="common-title clearfix">
                    <h3>行情走势</h3>
                    <!--<ul class="title-tab">
                        <li class="active">品类A</li>
                        <li>品类B</li>
                        <li>品类C</li>
                        <li>品类D</li>
                        <li>品类F</li>
                    </ul>-->
                    <a href="#" target="_blank" class="more icon">更多</a>
                </div>
                <div class="clearfix">
                    <div class="content-left fl">
                        <div class="price-info">
                            <div class="price-info-head">
                                <div class="city-show cl" id="indexCity">
                                        
                                    <!--<div class="fl">
                                        <i class="icon i-city"></i>
                                        <span id="indexCurrentCity">华东区域 ∨</span>
                                    </div>-->
                                    
                                    <!-- id="t_category_list" -->
                                    <ul class="tab-content fl" >
                                        <li class="c-page selected-color">
                                            <a href="javascript:void(0)" onclick="q_doPage('全部-1','')">全部</a>
                                        </li>
                                        <c:forEach items="${category }" var="category" >
                                            <li class="c-page">
                                               <a href="javascript:void(0)" onclick="q_doPage('${category.categoryId }','')">${category.name }</a>
                                            </li>
                                        </c:forEach> 
                                    
                                        <li class="hove-more">
                                            <i class="icon i-city"></i>
                                            <a href="javascript:void(0)" class="more fl">
                                                <span class="area fl">区域</span>
                                                <i class="icon fl"></i>
                                            </a>
                                            <div class="city-more">
                                                <a href="javascript:void(0)" onclick="q_doPage('','全部-1')">全部</a>
                                                <c:forEach items="${sysarea }" var="sysarea">
                                                    <a href="javascript:void(0)" onclick="q_doPage('','${sysarea.areaCode }')">${sysarea.name }</a>
                                                </c:forEach>
                                                
                                            </div>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div class="box-chart">
                            <div id="container" style="min-width:400px;height:220px"></div>
                        </div>
                        <div class="data-table">
                            <table width="100%" style="margin-bottom:5px;">
                                <tbody>
                                    <tr>
                                        <th style="border-right:2px solid #fff;" width="168px">厂家</th>
                                        <th width="65px">日期</th>
                                    </tr>
                                </tbody>
                            </table>
                            <div class="scroll-y">
                            <table width="100%" class="content">
                                <tbody id="q_id_list">
                                    
                                </tbody>
                            </table>
                            </div>
                        </div>
                    </div>

                    <div class="content-right fr">
                        <h3 class="content-right-title">行情分析</h3>
                        <ul class="right-list" id="analysis_list">
                            
                        </ul>
                    </div>
                </div>
            </div>
			<!--行形走势结束-->

			<!--现货交易开始-->
			<div class="content content-xhjy common">
				<div class="common-title">
					<h3>现货交易</h3>
					<a href="#" target="_blank" class="more icon">更多</a>
				</div>

				<div class="clearfix">
					<div class="content-left fl h285">
						<div class="tab">
							<ul>
								<li class="active" onclick="r_doPage(1)">供求</li>
								<li onclick="r_doPage(2)">求购</li>
							</ul>
						</div>
						
						<div class="tab-content">
                            <ul id="r_id">
                            </ul>
						</div>
					</div>

					<div class="content-right  fr h285">
						<h3 class="content-right-title">成交动态</h3>
						<div id="cjdt-marquee">
							<ul class="right-list">
								<li>
									<a href="#"><span class="r-name">c****73</span><span class="r-category">工业废纸</span> <span class="r-weight">20吨</span><span class="r-time">06/09  12:30</span></a>
								</li>
								<li>
									<a href="#"><span class="r-name">c****73</span><span class="r-category">工业废纸</span> <span class="r-weight">20吨</span><span class="r-time">06/09  12:30</span></a>
								</li>
								<li>
									<a href="#"><span class="r-name">c****73</span><span class="r-category">工业废纸</span> <span class="r-weight">20吨</span><span class="r-time">06/09  12:30</span></a>
								</li>
								<li>
									<a href="#"><span class="r-name">c****73</span><span class="r-category">工业废纸</span> <span class="r-weight">20吨</span><span class="r-time">06/09  12:30</span></a>
								</li>
								<li>
									<a href="#"><span class="r-name">c****73</span><span class="r-category">工业废纸</span> <span class="r-weight">20吨</span><span class="r-time">06/09  12:30</span></a>
								</li>
								<li>
									<a href="#"><span class="r-name">c****73</span><span class="r-category">工业废纸</span> <span class="r-weight">20吨</span><span class="r-time">06/09  12:30</span></a>
								</li>

							</ul>
						</div>
					</div>
				</div>
			</div>
			<!--现货交易结束-->

			<!--现货交易开始-->
			<div class="content content-tjmj common">
				<div class="common-title">
					<h3>推荐卖家</h3>
				</div>

				<div class="tab-content">
					<ul class="clearfix">
						<li>
							<h1> <a href="#"><img width="30px" height="30px" src="static/img/tjmj.png" /> 清远市东江环保技术有限公司</a></h1>
							<h2>联系人： 汪先生</h2>
							<h3>电 话：13554760514</h3>
						</li>
						<li>
							<h1><a href="#"><img width="30px" height="30px" src="static/img/tjmj.png" />清远有限公司</a></h1>
							<h2>联系人： 汪先生</h2>
							<h3>电 话：13554760514</h3>
						</li>
						<li>
							<h1> <a href="#"><img width="30px" height="30px" src="static/img/tjmj.png" /> 清远市东江环保技术有限公司</a></h1>
							<h2>联系人： 汪先生</h2>
							<h3>电 话：13554760514</h3>
						</li>
						<li>
							<h1><a href="#"><img width="30px" height="30px" src="static/img/tjmj.png" />清远有限公司</a></h1>
							<h2>联系人： 汪先生</h2>
							<h3>电 话：13554760514</h3>
						</li>
						<li>
							<h1> <a href="#"><img width="30px" height="30px" src="static/img/tjmj.png" /> 清远市东江环保技术有限公司</a></h1>
							<h2>联系人： 汪先生</h2>
							<h3>电 话：13554760514</h3>
						</li>
						<li>
							<h1><a href="#"><img width="30px" height="30px" src="static/img/tjmj.png" />清远有限公司</a></h1>
							<h2>联系人： 汪先生</h2>
							<h3>电 话：13554760514</h3>
						</li>
						<li>
							<h1> <a href="#"><img width="30px" height="30px" src="static/img/tjmj.png" /> 清远市东江环保技术有限公司</a></h1>
							<h2>联系人： 汪先生</h2>
							<h3>电 话：13554760514</h3>
						</li>
						<li>
							<h1><a href="#"><img width="30px" height="30px" src="static/img/tjmj.png" />清远有限公司</a></h1>
							<h2>联系人： 汪先生</h2>
							<h3>电 话：13554760514</h3>
						</li>
						<li>
							<h1> <a href="#"><img width="30px" height="30px" src="static/img/tjmj.png" /> 清远市东江环保技术有限公司</a></h1>
							<h2>联系人： 汪先生</h2>
							<h3>电 话：13554760514</h3>
						</li>
						<li>
							<h1><a href="#"><img width="30px" height="30px" src="static/img/tjmj.png" />清远有限公司</a></h1>
							<h2>联系人： 汪先生</h2>
							<h3>电 话：13554760514</h3>
						</li>

					</ul>
				</div>
			</div>
			<!--现货交易结束-->

			<!--供求黄页开始-->
			<div class="content content-gqhy common">
				<div class="common-title">
					<h3>供求黄页</h3>
					<a href="#" target="_blank" class="more icon">更多</a>
				</div>

				<div class="clearfix">
					<div class="content-left fl h285">
						<div class="tab">
							<ul>
							    <li class="active" onclick="s_doPage(1)">供求</li>
                                <li onclick="s_doPage(2)">求购</li>
							</ul>
						</div>
						<div class="tab-content">
							<ul class="clearfix" id="s_id">
							</ul>
							<span class="line"></span>
						</div>
					</div>

					<div class="content-right fr h285">
						<h3 class="content-right-title">操作指南</h3>
						<div class="czzn-procedure"><img width="270px" height="130px" src="static/img/czzn.jpg" /></div>
						<div class="content-right-bottom tc">
							<a class="Release-button">免费发求购</a>
							<a class="toseller-button">进入卖家中心</a>
						</div>
					</div>
				</div>
			</div>
			<!--供求黄页结束-->

			<!--招标公告开始-->
			<div class="content content-zbgg common">
				<div class="common-title">
					<h3>招标公告</h3>
					<a href="#" target="_blank" class="more icon">更多</a>
				</div>

				<div class="clearfix">
					<div class="content-left fl h285">
						<table class="tab-content">
							<tbody>
								<tr>
									<th width="50%">项目名称</th>
									<th width="25%">城市</th>
									<th width="25%">开标时间</th>
								</tr>
								<c:forEach items="${tenderingVo }" var="tenderingVo">
								    <tr>
	                                    <td><i>●&nbsp;&nbsp;</i>${tenderingVo.title }</td>
	                                    <td>${tenderingVo.province }${tenderingVo.city }${tenderingVo.city }</td>
	                                    <td>${tenderingVo.startTime}</td>
	                                </tr>
								</c:forEach>
							</tbody>
						</table>
					</div>

					<div class="content-right fr h285">
						<h3 class="content-right-title">中标公告</h3>
						<div id="zbgg-marquee">
							<ul class="right-list">
								<li>
									<a href="#"><span class="z-name"><i>●&nbsp;&nbsp;</i>c****73工业废纸河南郑州</span><span class="z-time">2017-10-13</span></a>
								</li>
								<li>
									<a href="#"><span class="z-name"><i>●&nbsp;&nbsp;</i>工业废纸加工厂河南商丘</span><span class="z-time">2017-10-13</span></a>
								</li>
								<li>
									<a href="#"><span class="z-name"><i>●&nbsp;&nbsp;</i>c****73工业废纸河南郑州</span><span class="z-time">2017-10-13</span></a>
								</li>
								<li>
									<a href="#"><span class="z-name"><i>●&nbsp;&nbsp;</i>工业废纸加工厂河南商丘</span><span class="z-time">2017-10-13</span></a>
								</li>
								<li>
									<a href="#"><span class="z-name"><i>●&nbsp;&nbsp;</i>c****73工业废纸河南郑州</span><span class="z-time">2017-10-13</span></a>
								</li>
								<li>
									<a href="#"><span class="z-name"><i>●&nbsp;&nbsp;</i>工业废纸加工厂河南商丘</span><span class="z-time">2017-10-13</span></a>
								</li>
								<li>
									<a href="#"><span class="z-name"><i>●&nbsp;&nbsp;</i>工业废纸加工厂河南商丘</span><span class="z-time">2017-10-13</span></a>
								</li>
								<li>
									<a href="#"><span class="z-name"><i>●&nbsp;&nbsp;</i>c****73工业废纸河南郑州</span><span class="z-time">2017-10-13</span></a>
								</li>
								<li>
									<a href="#"><span class="z-name"><i>●&nbsp;&nbsp;</i>工业废纸加工厂河南商丘</span><span class="z-time">2017-10-13</span></a>
								</li>
							</ul>
						</div>
					</div>
				</div>
			</div>
			<!--招标公告结束-->
			<footer class="common">
				<div class="footer-top">
					<ul>
						<li class="plqq">
							<span class="icon"></span>
							<h1>品种规格齐全</h1>
						</li>
						<li class="zzbz">
							<span class="icon"></span>
							<h1>质量可靠保障</h1>
						</li>
						<li class="jgyz">
							<span class="icon"></span>
							<h1>价格占有优势</h1>
						</li>
						<li class="qqbt">
							<span class="icon"></span>
							<h1>缺钱可打白条</h1>
						</li>
						<li class="mfzc">
							<span class="icon"></span>
							<h1>免费找货找车</h1>
						</li>
					</ul>
				</div>
				<div class="footer-bottom">
					<h1 class="common tc">Copyright©right;2018 www.zaishengwang.com Inc. All rights reserved</h1>
					<h2 class="common tc">苏ICP证161025号 | 苏ICP备15001001号 | 再生网</h2>
				</div>
			</footer>
			
			<input type="hidden" id="c_id" value="" />
			<input type="hidden" id="province_id" value="" />
			

		</div>
		<script type="text/javascript" src="<c:url value="/static/lib/highcharts.js"/>"></script>
		<script type="text/javascript" src="<c:url value="/static/lib/exporting.js/"/>"></script>
		<script type="text/javascript" src="<c:url value="/static/lib/swiper.min.js/"/>"></script>
		<script type="text/javascript" src="<c:url value="/static/js/index.js/"/>"></script>
		<script type="text/javascript">
			$(document).ready(function() {
				//导航高亮
	        	$("#nav_main li").eq(0).addClass("selected-color");
				//轮播图配置
                var swiper = new Swiper('.swiper-container', {
                    spaceBetween: 30,
                    centeredSlides: true,
                    autoplay: {
                        delay: 2500,
                        disableOnInteraction: false,
                    },
                    pagination: {
                        el: '.swiper-pagination',
                        clickable: true,
                    },
                    navigation: {
                        nextEl: '.swiper-button-next',
                        prevEl: '.swiper-button-prev',
                    },
                });
				
                //文字滚动
                $("#notice-marquee").scrollTop();
                $("#zbgg-marquee").scrollTop();
                $("#cjdt-marquee").scrollTop();
                //行情交易品类切换
                $('.content-hqzs .tab-content li.c-page').click(function() {
                    //选项卡按钮样式切换
                    $('.content-hqzs .tab-content li.c-page').removeClass('selected-color');
                    $(this).addClass('selected-color');
                });
                
                //行情交易城市切换
                $(".city-more a").click(function(){
                    var text_ = $(this).text();
                    $(".area").text(text_);
                })
                //现货交易切换
                $(".content-xhjy .tab li").hover(function() {
                    $('.content-xhjy .tab li').removeClass('active');
                    $(this).addClass('active');
                }, function() {

                });
                
                //供求黄页切换
                $(".content-gqhy .tab li").hover(function() {
                    $('.content-gqhy .tab li').removeClass('active');
                    $(this).addClass('active');
                }, function() {

                });
				
                //二级类目
                //r_category_doPage();
                //行情走势图
                q_doPage();
                //行情列表数据
                r_list_doPage("");
                //行情分析
                analysit_daPage();
				//现货
				r_doPage(1);
				//供求
				s_doPage(1);
			});
			
			//二级类目
			function r_category_doPage(){
                 $.ajax({
                        type: "post",
                        url: "<c:url value="/twoCategoryList.do"/>",
                        data:'',
                        cache: true,
                        async:false, 
                        dataType: "json",
                        success: function(data){
                             var result = "";
                             var categoryId = $("#c_id").val();
                             if (data.categoryVo.length>0) {
                                 for (var i = 0 ; i<data.categoryVo.length;i++) {
                                	 if (categoryId == "") {
                                		 if (i == 0) {
                                             result += '<li class="c-page selected-color" id=c_'+data.categoryVo[i].categoryId+'>';
                                             $("#c_id").val(data.categoryVo[i].categoryId);
                                         }else{
                                             result += '<li class="c-page" id=c_'+data.categoryVo[i].categoryId+'>';
                                         }
                                	 }
                                	 
                                     result += "<a href=\"javascript:void(0)\" onclick=\"q_doPage('"+data.categoryVo[i].categoryId+"','')\">"+data.categoryVo[i].name+"</a>";
                                     result += '</li>';
                                 }
                                 
                                 result += '<li class="hove-more">';
                                 result += '<i class="icon i-city"></i>';
                                 result += '<a href="javascript:void(0)" class="more fl">';
                                 result += '<span class="area fl">区域</span>';
                                 result += '<i class="icon fl"></i>';
                                 result += '</a>';
                                 result += '<div class="city-more">';
                                 result += "<a href=\"javascript:void(0)\" onclick=\"q_doPage('','华东')\">华东</a>";
                                 result += "<a href=\"javascript:void(0)\" onclick=\"q_doPage('','华南')\">华南</a>";
                                 result += "<a href=\"javascript:void(0)\" onclick=\"q_doPage('','华中')\">华中</a>";
                                 result += "<a href=\"javascript:void(0)\" onclick=\"q_doPage('','华北')\">华北</a>";
                                 result += "<a href=\"javascript:void(0)\" onclick=\"q_doPage('','东北')\">东北</a>";
                                 result += '</div>';
                                 result += '</li>';
                             }

                             $("#t_category_list").html(result);
                             
                             //行情走势图
                             q_doPage();
                             //行情列表数据
                             r_list_doPage("");
                             //行情分析
                             analysit_daPage();
                        }
                 })
            }
			
			//行情走势图数据
			function q_doPage(categoryId,province){

				if (categoryId == undefined || categoryId == "") {
	                categoryId = $("#c_id").val()
	            }else if (categoryId == "全部-1") {
	                categoryId = "";
	                $("#c_id").val("");
	            }else {
	                $("#c_id").val(categoryId);
	            }
	            if (province == undefined || province == "") {
	                province = $("#province_id").val()
	            }else if (province == "全部-1") {
	                province = "";
	                $("#province_id").val("");
	            }else {
	                $("#province_id").val(province)
	            }
				
				var dataTime = new Array();
				var dataAvgnum =[];
				var str = "";
                $.ajax({
                    type: "post",
                    url: "<c:url value="/quotationtrendList.do"/>",
                    data: {
                    	categoryId : categoryId,
                    	province : province,
                    	page : 1,
                        size : 10
                    },
                    cache: true, 
                    async:false, 
                    dataType: "json",
                    success: function(data){
                         var result = "";
                         if (data.quotationtrendVo.length>0) {
                             for (var i = 0 ; i<data.quotationtrendVo.length;i++) {
                            	 dataTime.push(data.quotationtrendVo[i].countTime);
                            	 str += data.quotationtrendVo[i].avgNum +",";
                             }
                         }
                         
                         var strArr = str.split(",");
                         strArr.pop();
                         for (var i = 0; i < strArr.length; i++) {
                        	 dataAvgnum.push(Number.parseInt(strArr[i]));
                         }
                         highcharts(dataTime,dataAvgnum);
                    }
                })
                //行情列表数据
                r_list_doPage(province);
			}
			
			//行情走势图
			function highcharts(categories,data){
				//对数折线图配置
                var chart = Highcharts.chart('container',{
                    title: {
                        text: ''
                    },
                    xAxis: {
                         tickInterval:1,
                         categories: categories,//[ '1/5', '1/6', '1/7', '1/8','1/9', '1/10', '1/11','1/12','3/12', '4/11','5/12'],
                    },
                    colors:[
                            '#1293d2'
                           ],
                    yAxis: {
                        tickPositions: [1000, 1500, 2000, 2500,3000,3500,9000], 
                        allowDecimals:false,
                        title: {
                            text: '',
                        }
                    },
                    legend: {
                        enabled: false
                    },
                    plotOptions: {
                        area: {
                            fillColor: {
                                linearGradient: {
                                    x1: 0,
                                    y1: 0,
                                    x2: 0,
                                    y2: 1
                                },
                            },
                            states: {
                                hover: {
                                     enabled: true
                                }
                            },
                            threshold: null
                        },
                        
                        series: {
                            marker: {
                                enabled: false, 
                                radius: 2,  
                              
                            },
                        }
                    },
                
                    series: [{
                        radius: 1, 
                        pointStart: 0,
                        name: name,
                        data: data,//[61, 62, 63,64, 65, 67, 68, 69, 80, 11],
                        lineWidth:1
                    }]
                });
			}
			
			// 行情列表数据
			function r_list_doPage(province){
				var categoryId = $("#c_id").val();

                $.ajax({
	                    type: "post",
	                    url: "<c:url value="/quotationtrendNameList.do"/>",
	                    data: {
	                    	categoryId : categoryId,
	                    	province : province,
	                    	page : 1,
	                        size : 10
	                    },
	                    cache: true,
	                    async:false,
	                    dataType: "json",
	                    success: function(data){
	                         var result = "";
	                         if (data.quotationtrendVo.length>0) {
	                             for (var i = 0 ; i<data.quotationtrendVo.length;i++) {
	                            	 result += '<tr>';
	                            	 result += '<td class="f-name">'+data.quotationtrendVo[i].factoryName+'</td>';
	                            	 result += '<td class="f-time">'+data.quotationtrendVo[i].createTime+'</td>';
	                            	 result += '</tr>';
	                             }
	                         }
	                         $("#q_id_list").html(result);
	                    }
				 })
			}
			
			//行情分析
			function analysit_daPage(){
				$.ajax({
                    type: "post",
                    url: "<c:url value="/quotationanalysisList.do"/>",
                    data: {
                         type : 1,
                         page : 1,
                         size : 10
                    },
                    cache: true,
                    async:false, 
                    dataType: "json",
                    success: function(data){
                         var result = "";
                         var name = "";
                         if (data.quotationqnalysis.result.length>0) {
                             for (var i = 0 ; i<data.quotationqnalysis.result.length;i++) {
                                 
                                 if (data.quotationqnalysis.result[i].name.length>30) {
                                     name = data.quotationqnalysis.result[i].name.substring(0, 30)+"...";
                                 }else {
                                     name = data.quotationqnalysis.result[i].name;
                                 }
                                 
                                 result += '<li>';
                                 result += "<a href=\"<c:url value="/toQuotationanalysisDetails.do"/>?id="+data.quotationqnalysis.result[i].bId+"\" class='zp fl'>"+name+"</a>";
                                 result += '<span class="fr">'+data.quotationqnalysis.result[i].createTime.substring(5, 10)+'</span>';
                                 result += '</li>';
                             }
                         }
                         $("#analysis_list").html(result);
                    }
                })
			}
			
			//现货
            function r_doPage(type){
		        $.ajax({
		            type: "post",
		            url: "<c:url value="/supplyList.do"/>",
		            data: {
		            	page : 1,
		            	size : 2,
		            	type : type
		            },
		            cache: true,
		            dataType: "json",
		            success: function(data){
		            	 var result = "";
		            	 if (data.GoodssupplyVo.length>0) {
		            		 for (var i = 0 ; i<data.GoodssupplyVo.length;i++) {
		            			 result += '<li>';
		            			 result += '<a class="c-name" href="#">';
		            			 result += '<i>●&nbsp;&nbsp;</i>'+data.GoodssupplyVo[i].title;
		            			 result += '</a>';
		            			 result += '<span class="c-city">'+data.GoodssupplyVo[i].province+'-'+data.GoodssupplyVo[i].city+'</span>';
		            			 result += '<span class="c-weight">'+data.GoodssupplyVo[i].num+'<i>吨</i></span>';
		            			 result += '<span class="c-price">'+data.GoodssupplyVo[i].price+'<i>元/吨</i></span>';
		            			 result += '<a class="c-time">立即匹配</a>';
		            			 result += '</li>';
		            		 }
		            	 }
		            	 $("#r_id").html(result);
		            }
				})
			}
			
            //供求
            function s_doPage(type){
                $.ajax({
                    type: "post",
                    url: "<c:url value="/indexSupplydemandList.do"/>",
                    data: {
                        page : 1,
                        size : 2,
                        type : type
                    },
                    cache: true,
                    dataType: "json",
                    success: function(data){
                         var result = "";
                         if (data.supplydemandVo.length>0) {
                             for (var i = 0 ; i<data.supplydemandVo.length;i++) {
                            	 result += '<li>';
                            	 result += '<a href="#" target="_blank"><i>●&nbsp;&nbsp;</i>'+data.supplydemandVo[i].title+'</a><span>'+data.supplydemandVo[i].createTime+' </span></li>';
                            	 result += '<li>';
                             }
                         }
                         $("#s_id").html(result);
                    }
                })
		  };
			
			
		</script>
	</body>

</html>